package hippocrene.core;

import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;



public class HHGyro extends HHModule implements SensorEventListener {
	
	private static SensorManager sensorManager;
	private Sensor Gyroscope;
	
	private volatile float[] fAngularSpeedValue= new float[3];
	private volatile float[] fAngularValue= new float[3];
	
	
	private HHGyro()
	{
		Gyroscope= sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
		
	}

    private static class LazyHolder {
            private static final HHGyro INSTANCE = new HHGyro();
    }

    public static final HHGyro getInstance(SensorManager sM) {
    		sensorManager = sM;
            return LazyHolder.INSTANCE;
    }
	
	@Override
	public void onAccuracyChanged(Sensor sensor, int accuracy) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onSensorChanged(SensorEvent event) {
		// TODO Auto-generated method stub
		
	}
    
    
	@Override
	public void init()
	{}
	
	@Override
	public void update()
	{}
	
	@Override
	public void reset()
	{}
	
	private float[] xCalculateOrientation()
	{
		
		
		return fAngularValue;
	}
}
